{extend name="base"/}

{block name="resources"}
<style>
	.nc-icon img {margin-right: 5px;}
	.nc-list.style1 .head{border-bottom: 1px solid #e5e5e5;}
	.nc-module-display .nc-module-pic{border-radius: 5px;}
</style>
{/block}
{block name="main"}
<div class="nc-module-display">
	<div class="nc-module-pic">
		{if condition="$site_info.icon eq ''"}
		<img src="__ROOT__{$site_info.app_icon}" name="headimg" class="nc-item-pic">
		{else /}
		<img src="{:img($site_info.icon)}" name="headimg" class="nc-item-pic">
		{/if}
	</div>
	<div class="nc-module-content">
		<h2 class="nc-module-title">{$site_info.site_name}</h2>
		<span class="nc-module-desc">{$site_info.title}</span>
	</div>
</div>
	<div class="layui-tab" lay-filter="tag_block">
		<ul class="layui-tab-title">
			<li lay-id="basic_info">基础信息</li>
			<li lay-id="founder_info">创建人信息</li>
			<li lay-id="module_info">模块信息</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item">
				<div class="nc-list style1">
					<div class="head">
						<h2>站点基础信息</h2>
					</div>
					<ul>
						<li>
							<label>站点名称</label>
							<span>{$site_info.site_name}</span>
						</li>
						<li>
							<label>创建人</label>
							<span>{$site_info.username}</span>
						</li>
						<li>
							<label>创建人管理组</label>
							<span>{$site_info.group_name}</span>
						</li>
						<li>
							<label>站点类型</label>
							<span>{$site_info.title}</span>
						</li>
						<li>
							<label>站点状态</label>
							<span>{$site_info.status ==0?"体验期":"正常"}</span>
						</li>
						<li>
							<label>站点域名</label>
							<span>{$site_info.domain}</span>
						</li>
						<li>
							<label>创建时间</label>
							<span>{$site_info.create_time | date="Y-m-d H:i:s",###}</span>
						</li>
						<li>
							<label>站点描述</label>
							<span>{$site_info.description}</span>
						</li>
						<li>
							<label>站点简介</label>
							<span>{$site_info.desc}</span>
						</li>
						<li>
							<label>到期时间</label>
							<span>{$site_info.validity_time == 0 ? '永久' : nc.time_to_date($site_info.validity_time)}</span>
						</li>
					</ul>
				</div>
			</div>
			<div class="layui-tab-item">
				<div class="nc-list style1">
					<div class="head">
						<h2>创建人信息</h2>
					</div>
					<ul class="layui-form">
						<li>
							<label>头像</label>
							<span>
								<div class="headframe">
								   {empty name="$user_info['headimg']"}
								   <img src="SITEHOME_IMG/personal_4.png" name="headimg" class="icon" width="45px" height="45px">
								   {else /}
								   <img src="{:img($user_info['headimg'])}" name="headimg" class="icon" width="45px" height="45px">
								   {/empty}
								</div>
							</span>
						</li>
						<li>
							<label>用户名</label>
							<span>{$user_info['username']}</span>
						</li>
						<li>
							<label>密码</label>
							<span>*******</span>
						</li>
						<li>
							<label>用户昵称</label>
							<span>{$user_info['nick_name']}</span>
						</li>
						<li>
							<label>真实姓名</label>
							<span>{$user_info['real_name']}</span>
						</li>
						<li>
							<label>手机号</label>
							<span>
                               {notempty name="$user_info['mobile']"}
                               {$user_info['mobile']}
                               {/notempty}
                           </span>
						</li>
						<li>
							<label>注册时间</label>
							<span>
                             {if $user_info['register_time'] > 0  }
					           {$user_info['register_time']| date="Y-m-d H:i:s",###}
						     {/if}
						   </span>
						</li>
						<li>
							<label>上次登录时间</label>
							<span>
                           {if $user_info['last_login_time'] > 0  }
					           {$user_info['last_login_time']| date="Y-m-d H:i:s",###}
				           {/if}
	                        </span>
						</li>
						<li>
							<label>上次登录ip</label>
							<span>{$user_info['last_login_ip']}</span>
						</li>
						<li>
							<label>用户短信条数</label>
							<span>{$user_info['sms_num']}</span>
						</li>
					</ul>
				</div>
			</div>
			
			<div class="layui-tab-item">
				<div class="layui-form layui-show">
					<table class="layui-table" id="site_list" lay-filter="site_list"></table>
				</div>
			</div>
		</div>
	</div>


<script type="text/html" id="site_name">
	<div class="img-wrap">
		{{# if(d.icon == ''){ }}
		<img src="SITEHOME_IMG/sitehome/tc1_91.png">
		{{# } else { }}
		<img src='__ROOT__{{d.icon}}'>
		{{# } }}
	</div>
	<span>{{d.name}}</span>
</script>
<script type="text/html" id="site_style">
	<span>{{d.title}}</span>
</script>

<script type="text/html" id="support_app_type_arr">
	
	<div class="nc-icon">
		
		{{# for(var o in d.support_app_type_arr){ }}
		<img src="__ROOT__/{{d.support_app_type_arr[o].logo}}" title="支持{{d.support_app_type_arr[o].name}}端口">
		{{# } }}
	
	</div>

</script>

{/block}

{block name="script"}
<script>
	var site_id = {$site_id}, tab = "{$tab}", uid= {$uid};
	layui.use('element', function () {
		var element = layui.element;
		var layid = location.hash.replace(/^#tab=/, '');
		if (layid == "") layid = tab;
		
		element.tabChange('tag_block', layid);
		
		element.on('tab(tag_block)', function () {
			location.hash = 'tab=' + this.getAttribute('lay-id');
		});
	});
</script>
<script src="ADMIN_JS/site_detail.js"></script>
{/block}